package com.zrs.gmall.item.client;

import com.zrs.gmall.common.result.Result;
import com.zrs.gmall.item.client.impl.ItemDegradeFeignClient;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "service-item", fallback = ItemDegradeFeignClient.class)
public interface ItemFeignClient {

    @ApiOperation(value = "根据商品skuID查询，汇总商品详情页所需的7项数据")
    @GetMapping("/api/item/{skuId}")
    public Result getItemAllData(@PathVariable("skuId") Long skuId);
}